<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    // console.log(navigator.userAgent);

    if(navigator.userAgent.indexOf("Chrome") !== -1){
        console.log("谷歌浏览器")
    }else if(navigator.userAgent.indexOf("Firefox") !== -1){
        console.log("火狐浏览器")
    }else if(navigator.userAgent.indexOf("Safari") !== -1){
        console.log("Safari浏览器")
    }

    
    // 谷歌浏览器：Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

    // 火狐浏览器：Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:104.0) Gecko/20100101 Firefox/104.0

    // Safari浏览器：Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15
</script>
</html>